package com.zf.sqlite.utils;
// LogEntity.java

import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.ColumnInfo;

import com.zf.basetools.DateToolsUtils;

@Entity(tableName = "zfed_logs")
public class ZFEDLogsEntity {
    @PrimaryKey(autoGenerate = true)
    public long id;

    @ColumnInfo(name = "user")
    public String user;

    @ColumnInfo(name = "log_info")
    public String log_info;

    @ColumnInfo(name = "log_result")
    public String log_result;

    @ColumnInfo(name = "log_time")
    public String log_time;

    // 构造函数
    public ZFEDLogsEntity(String user, String log_info, String log_result) {
        this.user = user;
        this.log_info = log_info;
        this.log_result = log_result;
        this.log_time = DateToolsUtils.getCurrentTime("yyyy-MM-dd HH:mm:ss"); // 自动记录创建时间
    }

    // Getters and Setters
    public long getId() { return id; }
    public void setId(int id) { this.id = id; }

    public String getUser() { return user; }
    public void setUser(String user) { this.user = user; }

    public String getLog_info() { return log_info; }
    public void setLog_info(String log_info) { this.log_info = log_info; }

    public String getLog_result() { return log_result; }
    public void setLog_result(String log_result) { this.log_result = log_result; }

    public String getLog_time() { return log_time; }
    public void setLog_time(String time) { this.log_time = time; }
}
